package cn.yanxiaotong.Mygame;


import java.awt.Color;
import java.awt.Graphics;

import cn.yanxiaotong.MyFrame.MyFrame;

public class Explode {
private int x,y;
private boolean live=true;
int[] zhiJing={2,4,8,15,16,20,16,10,5,2};
private int step=0;
MyFrame mf=null;
public Explode(int x,int y,MyFrame mf) {
	this.x = x;
	this.y = y;
	this.mf=mf;
}

public boolean isLive() {
	return live;
}

public void setLive(boolean live) {
	this.live = live;
}

public void draw(Graphics g){
	if(!live)return;
	if(step==zhiJing.length){
		live=false;
		step=0;
		return;
	}
	Color c=g.getColor();
	g.setColor(Color.BLACK);
	g.fillOval(x, y, zhiJing[step], zhiJing[step]);
	g.setColor(c);
	step++;
}
}
